﻿/* 
 PureMVC C# Port by Andy Adamczak <andy.adamczak@puremvc.org>, et al.
 PureMVC - Copyright(c) 2006-08 Futurescale, Inc., Some rights reserved. 
 Your reuse is governed by the Creative Commons Attribution 3.0 License 
*/

#region Using

using System;

using PureMVC.Interfaces;
using PureMVC.Patterns;

#endregion

namespace PureMVC.Patterns
{

    public class Proxy : Notifier, IProxy, INotifier
    {
        protected string m_proxyName;

        protected object m_data;
        public static string NAME = "Proxy";

        public Proxy() : this(NAME, null)
        {
        }

        public Proxy(string proxyName) : this(proxyName, null)
        {
        }

        public Proxy(string proxyName, object data)
        {

            m_proxyName = (proxyName != null) ? proxyName : NAME;
            if (data != null) m_data = data;
        }
        public virtual void OnRegister()
        {
        }

        public virtual void OnRemove()
        {
        }

        public virtual string ProxyName
        {
            get { return m_proxyName; }
        }

        public virtual object Data
        {
            get { return m_data; }
            set { m_data = value; }
        }

    }
}
